package com.wayne.oauth2.service;

import com.wayne.oauth2.entity.Product;
import com.wayne.oauth2.fallback.ProductServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "product-service",fallback = ProductServiceFallbackFactory.class)
public interface ProductService {
    @GetMapping("/product/{id}")
    Product selectProductById(@PathVariable("id") Integer id);
}